package com.exercise.web.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl;

/**
 * @Description
 * @Date 2021/5/25 19:48
 * @Created by zhouchungui
 */
@Configuration
public class JMSConfig {

    @Bean
    public JavaMailSender getJavaMailSender(){
        JavaMailSenderImpl javaMailSender = new JavaMailSenderImpl();
        javaMailSender.setHost("smtp.qq.com");
        javaMailSender.setUsername("1146009494@qq.com");
        javaMailSender.setPassword("");
        javaMailSender.setDefaultEncoding("UTF-8");
        return javaMailSender;
    }

}
